import 'package:car_map/page/res/dimens.dart';
import 'package:flutter/material.dart';

class MyButton extends StatelessWidget {
  final VoidCallback callback;
  final String title;

  const MyButton({Key key, this.callback, this.title}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      margin: EdgeInsets.only(left: 20.0,right: 20.0),
      child: FlatButton(
          onPressed: callback,
          textColor: Colors.white,
          color: Colors.blue,
          disabledColor: Colors.blue[400],
          disabledTextColor: Colors.black26,
          child: Container(
            width: double.infinity,
            height: 48.0,
            alignment: Alignment.center,
            child: Text(
              title,
              style: TextStyle(fontSize: Dimens.font_sp18),
            ),
          )),
    );
  }
}
